<?php


namespace App\Services\Home;

use App\Models\Banner;
use App\Models\BannerType;
use App\Models\HomeGrid;

class GridService
{
    protected $grid;
    public function __construct(HomeGrid $grid){
        $this->grid = $grid;
    }

    /**
     * 获取前端九宫格
     * @return \Illuminate\Http\JsonResponse
     */
    public function getGridNine(){
        $grids = $this->grid::all()->take(9);
        return Success('获取成功！',$grids);
    }

}
